/**
 * Copyright (C) 2017 - 2020 https://github.com/joewee
 * <p>
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * <p>
 * http://www.apache.org/licenses/LICENSE-2.0
 * <p>
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.bifrost.model;

import javax.validation.constraints.Min;
import java.math.BigDecimal;

/**
 * @author joewee
 * @version 1.0.0
 * @Date 2017/11/2 20:11
 */
public class ItemModel {
    private Long skuId, categoryId;
    @Min(value = 1, message = "商品数量不满足条件")
    private Integer quantity;
    private Integer canReturnQuantity;
    private BigDecimal retailPrice, salePrice;
    private String skuName, imageUrl;
    private Boolean needService;
    private Boolean isAvailable;
    private boolean canReturn = true;
    private boolean isPromotionApplied;
    private Long appliedPromotionId;

    public Long getSkuId() {
        return skuId;
    }

    public void setSkuId(Long skuId) {
        this.skuId = skuId;
    }

    public Integer getQuantity() {
        return quantity;
    }

    public void setQuantity(Integer quantity) {
        this.quantity = quantity;
    }

    public BigDecimal getRetailPrice() {
        return retailPrice;
    }

    public void setRetailPrice(BigDecimal retailPrice) {
        this.retailPrice = retailPrice;
    }

    public BigDecimal getSalePrice() {
        return salePrice;
    }

    public void setSalePrice(BigDecimal salePrice) {
        this.salePrice = salePrice;
    }

    public Long getCategoryId() {
        return categoryId;
    }

    public void setCategoryId(Long categoryId) {
        this.categoryId = categoryId;
    }

    public String getSkuName() {
        return skuName;
    }

    public void setSkuName(String name) {
        this.skuName = name;
    }

    public String getImageUrl() {
        return imageUrl;
    }

    public void setImageUrl(String imageUrl) {
        this.imageUrl = imageUrl;
    }

    public Boolean isNeedService() {
        return needService;
    }

    public void setNeedService(Boolean needService) {
        this.needService = needService;
    }

    //商品是否可用
    public Boolean isAvailable() {
        return isAvailable;
    }

    public void setAvailable(Boolean available) {
        isAvailable = available;
    }

    public boolean isPromotionApplied() {
        return isPromotionApplied;
    }

    public void setPromotionApplied(boolean promotionApplied) {
        isPromotionApplied = promotionApplied;
    }

    public Long getAppliedPromotionId() {
        return appliedPromotionId;
    }

    public void setAppliedPromotionId(Long appliedPromotionId) {
        this.appliedPromotionId = appliedPromotionId;
    }

    public boolean isCanReturn() {
        return canReturn;
    }

    public void setCanReturn(boolean canReturn) {
        this.canReturn = canReturn;
    }

    public Integer getCanReturnQuantity() {
        return canReturnQuantity;
    }

    public void setCanReturnQuantity(Integer canReturnQuantity) {
        this.canReturnQuantity = canReturnQuantity;
    }
}
